package com.heima.App;

import com.heima.Pojo.Brand;
import com.heima.Service.StudentService;
import com.heima.mapper.BrandMapper;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class AppFindAll {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext cpac =
                new ClassPathXmlApplicationContext("ApplicationContext-Jdbc.xml");
        BrandMapper brandMapper = (BrandMapper) cpac.getBean("brandMapper");
        List<Brand> brands = brandMapper.seleteAll();
        for (Brand brand : brands) {
            System.out.println(brand);
        }
        cpac.close();
    }
}
